<template>
  
  <div class="song-list">
    <van-nav-bar
      title="歌手信息"
      left-text="返回"
      left-arrow
      @click-left="onClickLeft"
    />
    <!-- <div class="header">
      <img :src="song.logo" alt="" />
      <h4>{{ song.dissname }}</h4>
      <div class="nick">
        <img :src="song.headurl" alt="" />
        <span>{{ song.nickname }}</span>
      </div>
      <span>播放量:{{ song.visitnum | numFilter }}</span>
    </div> -->
    <div>
      <img :src="singer.singer_pic"/>
      <van-tabs v-model="active">
        <van-tab title="百科">
          <SingerIntro :singerId="id" />
        </van-tab>
        <van-tab title="歌曲">
          <SingerSong :singerId="id" />
        </van-tab>
      </van-tabs>
    </div>
  </div>
</template>

<style>
</style>

<script>
import SingerIntro from "./components/SingerIntro.vue";
import SingerSong from "./components/SingerSong.vue";

export default {
  data() {
    return {
      active: 0,
      id: this.$route.params.id,
      singer:{}
    };
  },
  created(){
    this.singer=this.$store.state.singer
    console.log(this.singer)
  },
  methods: {
    onClickLeft() {
        console.log("调试页面",this.id)
        
      window.history.length > 1 ? this.$router.go(-1) : this.$router.push("/");
    },
  },
  components: {
    SingerIntro,
    SingerSong,
  },
};
</script>

